Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Fave): Charts and Dashboards fave/unfave do not commit transactions #30215

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

geido
Copy link
Member

@geido geido commented Sep 10, 2024

SUMMARY

We noticed that when faving/unfaving a Dashboard or a Chart the transaction wasn't being committed. This PR introduces commands and uses the transaction decorator to commit the transactions.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N.A.

TESTING INSTRUCTIONS

  1. Fave/Unfave should save for both charts and dashboards

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@github-actions github-actions bot added the api Related to the REST API label Sep 10, 2024
@dosubot dosubot bot added listview Namespace | Anything related to lists, such as Dashboards, Charts, Datasets, etc. listview:dashboards Related to the Dashboards' list labels Sep 10, 2024
Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, can you add tests for the NotFound and AccessDenied exceptions

@michael-s-molina
Copy link
Member

@geido If possible, could you use a more descriptive name for the commands? Maybe MakeFavoriteCommand and RemoveFavoriteCommand?

@geido
Copy link
Member Author

geido commented Sep 12, 2024

@geido If possible, could you use a more descriptive name for the commands? Maybe MakeFavoriteCommand and RemoveFavoriteCommand?

If the goal is to help people with finding all code related to favorites I believe AddFavoriteDashboardCommand and DelFavoriteDashboardCommand should be enough. Trying not to create a string that is just too long. These seem already on the edge.

@geido geido merged commit 23467bd into master Sep 12, 2024
33 checks passed
@sadpandajoe sadpandajoe added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Sep 12, 2024
sadpandajoe pushed a commit that referenced this pull request Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the REST API listview:dashboards Related to the Dashboards' list listview Namespace | Anything related to lists, such as Dashboards, Charts, Datasets, etc. size/L v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants